/*
 * Copyright (C) 2015-2018 EPAM Systems
 *
 * This file is part of Indigo ELN.
 *
 * Indigo ELN is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Indigo ELN is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Indigo ELN.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

@import 'helper.less';
@import 'controls.less';
@import 'tabs.less';
@import 'button.less';
@import 'table.less';
@import 'search.less';
@import 'pagination.less';
@import 'panels.less';
@import 'forms.less';
@import 'lists.less';
@import "icon.less";
@import 'dropdown.less';
@import 'dialogs.less';
@import 'label.less';
@import 'animation.less';
@import 'type.less';
@import 'notify.less';
@import "action-panel";

//GENERAL STYLES

html {
    height: 100%;
    overflow-y: auto;
}

body {
    color: @gray !important;
    height: 100%;
    min-width: 1020px;
    overflow-y: hidden;
}

.main-container {
    padding-top: 60px;
}

[ng\:cloak], [ng-cloak],
[data-ng-cloak], [x-ng-cloak],
.ng-cloak, .x-ng-cloak {
    display: none !important;
}

.row {
    margin-left: -15px !important;
    margin-right: -15px !important;

    > div {
        margin-bottom: 0;
    }
}

@-moz-document url-prefix() {
    fieldset { display: table-cell; }
}

//CONTAINER STYLES

#page-wrapper {
    padding-left: 0;
}

#page-wrapper.open #sidebar-wrapper {
    left: 0;
    margin-left: 0;
}

#page-wrapper,
#sidebar-wrapper {
    .transition(all, 0.3s, linear);
}

.main-page-content {
    background-color: @main-page-content-bg;
    height: ~"calc(100vh - @{navbar-height})";
    padding: @main-page-content-pad;
}

//ROW WITH INLINE ELEMENTS

.row-inline {
    > * {
        .display-inline();

        + * {
            margin-left: 5px;
        }
    }
    > span {
        margin-top: -3px;
    }
}

//MAIN BOTTOM BLOCK

.btn-bottom-block {
    margin: @pad-space 0;
    text-align: right;

    > * + * {
        margin-left: @space-between-btns;
    }

    &.experiment-preview-block{
        border-top: 1px solid #ddd;
        margin: 0px;
        padding: 20px 18px 20px 0px;
    }
}

//STATISTIC RADIO (MAIN PAGE)

.statistic-radio {
    position: relative;

  input {
    .opacity-input();
    z-index: 500;

    &:checked + .statistic-info {
      background-color: @statistic-radio-content-check-bg;

      &:after {
        color: @statistic-radio-check-icon-color;
        content: "\e92c";
      }
    }

    &:checked + .statistic-green{
      &:after {
        color: @brand8;
      }
    }

    &:checked + .statistic-orange{
      &:after {
        color: @brand6;
      }
    }

    &:checked + .statistic-yellow{
      &:after {
        color: @brand5;
      }
    }
  }

  .statistic-info {
    padding: @statistic-radio-content-pad;
    overflow: hidden;

    &:after {
      color: @statistic-radio-icon-color;
      content: "\e92b";
      font-family: 'icomoon';
      font-size: 15px;
      .position-abs-top-right(@pad-space, 50%);
      .transform-center(0, -50%);
      text-rendering: auto;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
  }

  .statistic-txt {
    font-family: 'RobotoCondensed Regular', sans-serif;
    float: left;
    width: @statistic-txt-width;
  }

  .progress {
    margin: 6px 40px 0 (@statistic-txt-width + 10px);
  }

  &.statistic-orange {
    .count {
      border-color: @statistic-orange-color;
    }

    .progress-bar {
      background-color: @statistic-orange-color;
    }
  }

    &.statistic-yellow {

      .count {
        border-color: @statistic-yellow-color;
      }
      .progress-bar {
        background-color: @statistic-yellow-color;
      }
    }
}

//PROGRESS BAR

.progress {
    box-shadow: none;
    height: 10px;

    &-bar {
        box-shadow: none;
    }
}

//COUNT (MAIN PAGE)

.count {
    border: @count-border;
    .border-radius(@uui-label-border-radius);
    .display-inline();
    font: @count-size @uui-label-family;
    min-width: @count-min-width;
    height: @count-height;
    text-align: center;
    padding: @count-pad;

    &-orange {
        border-color: @brand6;
    }

    &-yellow {
        border-color: @brand5;
    }
}

//Experiment count block (main page)

.experiment-count-block {
    font-family: 'RobotoCondensed Regular', sans-serif;
    padding: 10px;
    text-align: center;
    text-transform: uppercase;

    > * {
        display: block;
        line-height: 1;

        &:first-child {
            font-size: 68px;
            margin-bottom: 5px;
        }

        &:last-child {
            font-size: 10px;
            margin-top: 5px;
        }
    }
}

//LOGIN FORM

.login-form {
    margin-top: 50px;
}

.scroll-full {
    height: ~"calc(100vh - 180px)";
    overflow-y: auto;
    overflow-x: hidden;
}

.scroll-dashboard-full {
    height: ~"calc(100vh - 60px)";
    overflow-y: auto;
    overflow-x: hidden;
    position:relative;
}




//OLD STYLES

.newtemplate {
    width: 100px;
    height: 100px;
    float: left;
    list-style: none;
    text-align: center;
}

[data-notify="progressbar"] {
    margin-bottom: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

/* file uploader*/

.my-drop-zone {
    border: dotted 3px lightgray !important;
    text-align: center;
    height: 150px;

    &-input {
        margin: 0 auto;
    }

    &-file {
        padding-top: 25px;
    }
}

.nv-file-over {
    border: dotted 3px #4dd0e1 !important;
}

/* editable checklist*/
.editable-checklist label {
    display: block;
}

/* editable text fields */
.editable, .editable:hover {
    cursor: pointer !important;
    //text-decoration: none;
    //color: #428bca;
    //border-bottom: dashed 1px #428bca;
}

.disabled, .disabled:hover, [disabled], [disabled]:hover {
    color: black;
    text-decoration: none;
    cursor: not-allowed;
}


::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background: #c0c0c0;
}

::-webkit-scrollbar-track {
    background: transparent;
}

.tab-content.ng-enter {
    animation: fadeIn 0.7s;
}

.tab-content.ng-leave {
    animation: none;
}

.templates-holder {
    min-height: 200px;
}

.nav, .pagination, .carousel, .panel-title a {
    cursor: pointer;
}


.structure-editor-modal .modal-dialog {
    width: min-content;
}

.img-fill {
    height: 100%;
    width: 100%;
    padding: 10px;
    background-color: white;
}

.sizable-panel-body {
    height: 130px;
    box-sizing: content-box;
}

.structure-scheme {
  &__img {
    height: 150px;

    .ui-resizable-handle{
      color: #b2ebf2;
      font-family: 'icomoon' !important;
      font-size: 18px;
      speak: none;
      font-style: normal;
      font-weight: normal;
      font-variant: normal;
      text-transform: none;
      line-height: 0.5;
      height: 13px;

      &:before {
        content: "\e910";
      }
    }
  }
}

.select-structure {
    border: 0px;
    outline: 0px;
    background-color: transparent;
    font-weight: bold;
}

.clear-elem {
    clear: left;
    display: block;
}


.members .list-group-item {
    overflow: hidden;
    position: relative;
    display: block;
    padding: 5px 5px;
    margin-bottom: -1px;
    background-color: #fff;
    border: 1px solid #ddd;
}

.experiment-tab-close {
    margin-left: 10px;
    color: #337ab7
}

.compound-component div.col-xs-12.text-left div {
    width: 170px!important;
}

.compound-component .structure-preview-wrapper{
    display: flex;
    justify-content: flex-start;
    max-height: 150px;
    padding-left: 155px;
}

.compound-component .my-checkbox-wrapper {
    margin-left: 10px;
}

.dictionary-col-width {
    max-width: 200px;
}

.dictionary-col-elipsis {
    overflow: hidden;
    -ms-text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: inherit;
}

.active .experiment-tab-close {
    color: #37474f;
    margin-left: 10px;
}

.nav-pills {
  > li.active {
    > a,
    > a:hover,
    > a:focus {
      color: #37474f;
      background-color: #b2ebf2;
    }
  }
}

.slider-handle {
  background: #b2ebf2 none;
}

.slider.slider-horizontal .slider-track {
    height: 3px;
}

.slider.slider-horizontal .slider-tick, .slider.slider-horizontal .slider-handle {
    margin-top: -8px;
}

//--------------------PRINT STYLES
.experiment-preview {
  font-family: @print-font;
  color: @print-color;

  table {
    border: 1px solid @print-border-table-color;

    th,
    td {
      padding: 10px;
      border: 1px solid @print-border-table-color;
      word-break: break-word;
    }

    th {
      font-family: @print-header-row-font;
      font-weight: 900;
    }
  }

  .table-name {
    display: inline-block;
    margin-bottom: 5px;
    color: @print-color;
    font-size: 14px;
  }
  .print-header {
    margin-top: 20px;
    border: none;

    .logo {
      background: url("../images/logo_new_blue.png") no-repeat;
      background-size: cover;
      margin: 0;
    }

    tr {
      th {
        border: none;
        height: 50px;
        padding-left: 10px;

        h2 {
          margin: 0;
          font-family: inherit;
          font-style: italic;
          font-weight: bold;
          font-size: 16px;
          text-align: right;
          color: @print-header-color;
        }

        &:last-child {
          border-left: none;
        }
      }

      td {
        &:nth-child(odd) {
          font-family: @print-header-row-font;
          font-weight: 900;
        }
      }
    }
  }

  .print-table-inner {
    border: none;

    td {
      text-align: left;
      padding: 0 0 5px;
      border: none;
    }
  }

}

.print-header, .print-table, .print-table-simple, .print-box {
    width: 100%;
    margin-bottom: 50px;
    padding: 5px;
}

.print-table {
  table-layout : fixed;
}

.print-component .simditor-toolbar {
    display: none;
}

.print-component{
    display: flex;
  justify-content: flex-end;
    .my-checkbox-wrapper{
        padding-top:7px;
    }
  .simditor {
    margin-bottom: 50px;
    .simditor-body {
      p,
      li {
        color: @print-color;
      }
    }
  }
}

.print-table th, .print-table td {
    border-collapse: collapse;
    margin-bottom: 50px;
    padding: 8px;
    vertical-align: top;
}

.need-to-print .checkbox label:before {
    content: initial;
}

.need-to-print .checkbox label {
    font-size: 14px;
}

//--------------------SEARCH

.reagent-search-tab {
    padding-top: 10px;
}

//Main search block with advanced link

.main-search-block {

    .form-group {
        margin-bottom: 0;
    }

    .search-hint {
        font-size: @small-size;
        margin-top: 3px;
    }
}

.link-advanced-search {
    display: inline-block;
    font-size: 16px;
    margin-top: 30px;

    &:hover, &:focus {
        text-decoration: none;
    }

    .glyphicon {
        font-size: @small-size;
        margin-left: 5px;
    }
}

//Advanced search

.criteria-search-block {
    position: relative;

    .my-checkbox-wrapper,
    .search-structure-scheme {
        margin-bottom: 0;
    }

    .checkbox {
        margin-top: 0;
    }
}

.search-image {
    margin: 30px 0;
    display:flex;
}

//Search collapse

.reagent-search-collapse {
    margin: 10px 0;

  &-link {
    color: @gray;
    font-family: 'Source Sans Pro Semibold', sans-serif;
    text-decoration: none;

    .glyphicon {
      font-size: 10px;
      margin-top: -5px;
      margin-right: 5px;
      vertical-align: middle;
    }
  }
}

.collapse-content {
    margin-top: @pad-space;
}


//.ui-select-multiple.ui-select-bootstrap input.ui-select-search {
//    width: auto !important;
//}

.ui-select-multiple.ui-select-bootstrap {
    height: 34px;
}

.ui-select-container.ui-select-multiple .ui-select-match .btn {
    padding: 3px 10px;
}

.search-table-row-highlight {
    background-color: #b2ebf2;
}

#search-result-table, #my-reagent-list-table {
    table-layout: fixed;
    width: 100%;
}

#search-result-table td, #my-reagent-list-table td {
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.analyze-rxn-row div {
    margin-bottom: 0;
}

.analyze-rxn-selected-reactants {
    margin-left: 20px;
}

.search-tab-content {
    margin: 10px;
}

.search-structure-scheme .panel-heading {
    background-color: #f3f3f3;
    border-color: #d1d1d1;
}

.search-structure-scheme.panel-info {
    border-color: #d1d1d1;
}

//.melting-point-info div, .select-from-dictionary div {
//    margin-bottom: 0;
//}

.long-content-popup {
    overflow-y: scroll;
    max-height: 400px;
}

.experiment-tabs {
    overflow: auto;
}

.experiment-tabs .nav {
    white-space:nowrap;
}

.experiment-tabs .nav li {
    display: inline-block;
    float: none;
}
.experiment-tabs .mCSB_container {
    margin-bottom: 15px !important;
}

.experiment-tabs .mCSB_draggerContainer {
    background-color: #b2ebf2;
}
.experiment-tabs .mCSB_container.mCS_x_hidden{
    margin-bottom: 0 !important;
}

.role-check-icon {
    color: #84d5fb;
}

.ui-select-toggle {
    background-color: transparent;
}

body > .ui-select-bootstrap.open {
    z-index: 1050;
}

.components-holder-empty {
    /*content: 'You can drag & drop components here.';*/
    /*position: absolute;*/
    /*color: rgb(119, 119, 119);*/
    /*font-size: 24px;*/
    /*font-weight: 500;*/
    /*margin-top: 32px;*/
    /*left: 20%;*/
}

.entered-value {
    color: blue;
}

.not-editable {
    text-decoration: none;
    color: black;
    cursor: default;
}

.my-dropdown-list li a {
    padding: 8px;
}

ul.opened-entities {
    min-width: 250px;
}

ul.my-dropdown-list {
    padding: 5px;
}

.entity-changed {
    top: 2px;
    right: 4px;
    position: absolute;
    font-size: 15px;
    color: #23aabb;
}


//--------------------MEDIA

@media (min-width: 1200px) {
    .text-align-lg {
        text-align: right;
    }
}

@media (max-width: 1199px) {
    .m-bt-lg {
        margin-bottom: 10px !important;
    }
}

@media (min-width: 768px) {
    .text-align {
        text-align: right;
    }
}

@media (max-width: 767px) {
    .m-bt-sm {
        margin-bottom: 10px !important;
    }
}

.templates-and-tabs,
.list-group.palette {
    overflow-y: auto;
    max-height: 400px;
    position:relative;
}

.list-group.palette {
    max-height: 315px;
}

.draggable-component .icon-close {
    color: #777;
    cursor: pointer;
}

.list-group-drug .draggable-component:last-of-type {
    border: 0;
}

.drag-mess {
    text-align: center;
    line-height: 80px;
    color: #dfdfdf;
}

//--------------------TOOLTIP
.tooltip {
  -webkit-filter: drop-shadow(-1px -1px 2px @tooltip-shadow);
  filter: drop-shadow(-1px -1px 2px @tooltip-shadow);
  width: 165px;
  border: 1px solid #e3e3e3;
  background-color: #fafafa;

  &-inner {
    background-color: inherit;
  }

  &.right {
    padding: 0;
    margin-left: 10px;

    .tooltip-arrow {
      left: -5px;
    }
  }
}

//--------------------ROLES PAGE

.checkbox-label-wrapper {
    display: inline-block;
}

.autorecovery {
  padding: 4px 20px;
  background: @gray-little-clarified;
  position: absolute;
  color: @white;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
}

.autorecovery .btn {
  margin-left: 10px;
}

.message {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.autorecovery-buttons {
  float: right;
}

.autorecovery-buttons .btn-primary {
  background-color: @success-notify;
  border: none;
}

.autorecovery-buttons .btn-default {
  background-color: @gray-little-clarified;
  border: 1px solid @white;
  color: @white;
}

.reaction-popup .reaction-image {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    transition: opacity ease-out 0.3s;
    left: 200px;
    background: #fff;
    z-index: 1;
    width: 300px;
    height: 150px;
    background-size: contain;
    background-position: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.37);
    margin-left: -63px;
    background-repeat:  no-repeat;
    margin-top: -180px;
}

.reaction-popup:first-of-type .reaction-image{
    margin-top: 4px;
}

.reaction-popup:hover .reaction-image {
    opacity: 1;
    visibility: visible;
}

.dash-table .ellipsis {
    display: block
}

.dash-table {
    table-layout: fixed;

  .dash-exp-name {
    width: 25%;
  }

  .dash-proj-name {
    width: 20%;
  }

  .dash-date {
    width: 100px;
  }

  .dash-exp-id {
    width: 150px
  }

  .dash-exp-date {
    width: 11%;
  }
}


.search-result-table {
        max-height:500px;
        overflow-y:auto;
    .search-table-row {
        display: flex;
        justify-content: center;
        align-items: center;
        border-top: 1px solid #ccc;

    }
    .search-table-head {
        font-weight: bold
    }
    .t-item {
        padding: 2px 8px
    }
    .t-item .icon {
        line-height: 20px
    }
    .search-table-row {
        position: relative;
        cursor:default;
    }
    .search-table-head {
        position: absolute;
        width: ~"calc(100% - 40px)";
        background: #fff;
        z-index: 1;
        border:0;
    }
    .search-table-body {
        padding-top: 35px
    }
    .search-table-row .search-table-popup {
        visibility: hidden;
        position: absolute;
        width: 200px;
        text-align: center;
        height: 80px;
        overflow: hidden;
        border: 1px solid #ccc;
        left: 64px;
        top: 48px;
        background: #fff;
        z-index: 1;
        transition: visibility 0s ease-out, opacity 0.3s ease-out;
        transition-delay: 0s;
        opacity: 0;
    }
    .search-table-wrap:last-child .search-table-popup,
    .search-table-wrap:nth-last-child(2) .search-table-popup {
      top:-84px;
    }
  .t-item {
    &:first-child,
    &:nth-child(2) {
      width: 30px;
    }

    &:nth-child(3) {
      width: 100px;
    }

    &:nth-child(4),
    &:nth-child(5) {
      flex-grow: 1;
    }

    &:nth-child(6) {
      width: 150px;
    }
  }
    .search-table-row {
      .search-table-popup {
        .search-table-img {
          height: 100%;
        }
      }
    }

    .search-table-row:hover {
      .search-table-popup {
        visibility: visible;
        transition-delay: 0.5s;
        opacity: 1;
      }
    }
    .my-checkbox-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }
}
.search-result-table-label {
  padding: 0 20px;
}
.search-table-row-details {
  padding:20px;
}

.indigo {
  &-display-none {
    display: none;
  }
}

.search-result-table {
  &__img-structure {
    padding:10px;
    margin:10px;
    border:1px solid black;
  }
}

.create-experiment {
  &__table {
    height: 100px;
  }
}

.search-reagents {
  &__criteria-input {
    width:80px;
  }
}

.text-area {
  &__align {
    vertical-align: top;
  }
}
.experiments {
  &__icon-sort {
    .table-sort-icon;
  }
}

.inline-loader {
  visibility:hidden;
  display:inline-block;
  background: url(../images/spin-blue.svg) no-repeat center;
  height: 30px;
  width: 30px;
  background-size: 36px;
  margin-left: 10px;
  margin-top: -4px;
}
.inline-loader.is-loading {
  visibility: visible;
}
.batch-status{
  &:before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 10px;
    margin-right: 4px;
  }
  &.status-PASSED {
    color: #a3c644;
  }
  &.status-PASSED:before {
    background-color: #a3c644;
  }
  &.status-FAILED {
    color: #e4445f;
  }
  &.status:before {
    background-color: #e4445f;
  }
}

.notebook-reaction-img {
  height:100px;
}

.access-notification {
  display: flex;
  justify-content: center;
  font: @inner-tabs-link-family;
  font-size: @larger-size;
}

.list-component-buttons {
  display: inline-flex;
}
